
<?php defined('_JEXEC') or die('Restricted access'); 

	$edit		= JRequest::getVar('edit',true);
	$text = !$edit ? JText::_( 'Thêm mới' ) : JText::_( 'Sửa' );
	JToolBarHelper::title(JText::_( 'Danh sách cán bộ' ).': <small><small>[ ' . $text.' ]</small></small>','plugin.png' );
	JToolBarHelper::save( 'save', 'Lưu' );
	JToolBarHelper::cancel( 'cancel', 'Quay lại' );
	
	$editor =& JFactory::getEditor();
?>

<script language="javascript" type="text/javascript">
	function submitbutton(pressbutton) {
		var form = document.adminForm;
		if (pressbutton == 'cancel') {
			submitform( pressbutton );
			return;
		}
		
		if (document.getElementById('name').value == 0){
			alert( "<?php echo JText::_( 'Bạn chưa nhập Tên cán bộ', true ); ?>" );
		} else {
			submitform( pressbutton );
		}	
	}
	
</script>
<style type="text/css">
	table.paramlist td.paramlist_key {
/*		width: 92px;
*/		text-align: left;
		height: 30px;
	}

</style>

<form action="index.php" method="post" name="adminForm" id="adminForm" >
<div>
	<fieldset class="adminform">
		<legend><?php echo JText::_( 'Chi tiết' ); ?></legend>

		<table class="admintable">
		<tr>
			<td align="right" class="key"><?php echo JText::_( 'Hiển thị' ); ?>:</td>
			<td width="500">
				<?php echo $this->lists['published']; ?>
			</td>
		</tr>		
		<tr>
			<td align="right" class="key"><?php echo JText::_( 'Họ và tên' ); ?>:</td>
			<td width="500">	
				
                                <input class="text_area" type="text" name="name" id="name" size="55" value="<?php echo $this->item->name;?>" />
                        </td>
		</tr>
                <tr>
			<td align="right" class="key"><?php echo JText::_( 'Giới tính' ); ?>:</td>
			<td width="500">
                            <?php echo $this->lists['gender']; ?>
			</td>
		</tr>
		<tr>
			<td align="right" class="key"><?php echo JText::_( 'Ngày tháng năm sinh' ); ?>:</td>
			<td width="500">	
				<input class="text_area" type="text" name="age" id="age" size="55" value="<?php echo $this->item->age;?>" />
			</td>
		</tr>	
		<tr>
			<td align="right" class="key"><?php echo JText::_( 'Địa chỉ' ); ?>:</td>
			<td width="500">
				<input class="text_area" type="text" name="address" id="address" size="55" value="<?php echo $this->item->address;?>" />
			</td>
		</tr>			
		<tr>
			<td align="right" class="key"><?php echo JText::_( 'Số điện thoại' ); ?>:</td>
			<td width="500">
				<input class="text_area" type="text" name="phone" id="phone" size="55" value="<?php echo $this->item->phone;?>" />
			</td>
		</tr>
		<tr>
			<td align="right" class="key"><?php echo JText::_( 'Email' ); ?>:</td>
			<td width="500">
				<input class="text_area" type="text" name="email" id="email" size="55" value="<?php echo $this->item->email;?>" />
			</td>
		</tr>	
		<tr>
			<td align="right" class="key"><?php echo JText::_( 'Cơ quan' ); ?>:</td>
			<td width="500">
				<?php echo $this->lists['category']; ?>
			</td>
		</tr>
		<tr>
			<td align="right" class="key"><?php echo JText::_( 'Chức danh nhiệm vụ đang đảm nhiệm' ); ?>:</td>
			<td width="500">
				<input class="text_area" type="text" name="position" id="position" size="55" value="<?php echo $this->item->position;?>" />
			</td>
		</tr>
                <tr>
			<td align="right" class="key"><?php echo JText::_( 'Năm phong GS' ); ?>:</td>
			<td width="500">
				<input class="text_area" type="text" name="yearGS" id="yearGS" size="15" value="<?php echo $this->item->yearGS;?>" />
			</td>
		</tr>
                <tr>
			<td align="right" class="key"><?php echo JText::_( 'Năm phong PGS' ); ?>:</td>
			<td width="500">
				<input class="text_area" type="text" name="yearPGS" id="yearPGS" size="15" value="<?php echo $this->item->yearPGS;?>" />
			</td>
		</tr>
                <tr>
			<td align="right" class="key"><?php echo JText::_( 'Học vị' ); ?>:</td>
			<td width="500">
				<?php echo $this->lists['rank']; ?>
			</td>
		</tr>
		<tr>
			<td align="right" class="key" valign="top"><?php echo JText::_( 'Chuyên ngành' ); ?>:</td>
			<td width="500">
				<textarea class="text_area" name="field" id="field" cols="50" rows="2"><?php echo $this->item->field;?></textarea>			
			</td>
		</tr>
		<tr>
			<td align="right" class="key" valign="top"><?php echo JText::_( 'Quá trình đào tạo' ); ?>:</td>
			<td width="500">				
				<?php
					echo $editor->display('education', $this->item->education, '750', '350', '180', '50', true, array('pagebreak', 'readmore'));
				?>
			</td>
		</tr>
		<tr>
			<td align="right" class="key" valign="top"><?php echo JText::_( 'Quá trình hoạt động Khoa học – kỹ thuật' ); ?>:</td>
			<td width="500">				
				<?php
					echo $editor->display('technical', $this->item->technical, '750', '350', '180', '50', true, array('pagebreak', 'readmore'));
				?>	
			</td>
		</tr>
		<tr>
			<td align="right" class="key" valign="top"><?php echo JText::_( 'Mã và Tên đề tài thuộc CT KHCN vũ trụ tham gia thực hiện' ); ?>:</td>
			<td width="500">
				<?php
					echo $editor->display('projects', $this->item->projects, '750', '350', '180', '50', true, array('pagebreak', 'readmore'));
				?>
			</td>
		</tr>
		<tr>
			<td align="right" class="key" valign="top"><?php echo JText::_( 'Kết quả hoạt động KHKT và đào tạo' ); ?>:</td>
			<td width="500">
				<?php
					echo $editor->display('archive', $this->item->archive, '750', '350', '180', '50', true, array('pagebreak', 'readmore'));
				?>
			</td>
		</tr>	
		<tr>
			<td align="right" class="key" valign="top"><?php echo JText::_( 'Ngày, tháng, năm khai' ); ?>:</td>
			<td width="500">
				<input class="text_area" type="text" name="date_validate" id="date_validate" size="55" value="<?php echo $this->item->date_validate;?>" />
			</td>
		</tr>	
	</table>
	</fieldset>
</div>

<div class="clr"></div>
	<input type="hidden" name="option" value="com_staff" />
	<input type="hidden" name="cid[]" value="<?php echo $this->item->id; ?>" />
	<input type="hidden" name="task" value="" />
	<input type="hidden" name="view" value="staff" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>